import QtQuick 2.15
import QtQuick.Controls 2.15

ApplicationWindow {
	visible: true
	width: 600
	height: 600
	
	Rectangle {
		width: 512
		height: 512
		
		Image {
			id: myImage
			anchors.fill: parent
			source: "/resources/img/wheel"
			sourceSize.width: 2048
			sourceSize.height: 2048
			sourceClipRect: Qt.rect(20, 20, 512, 512)
		}
		
		MouseArea {
			anchors.fill: parent
			onClicked: {
				myImage.sourceClipRect = Qt.rect(-50, -50, 255, 255);
			}
		}
	}
}
